anchor.diff:        end do
   
         !! initialize each new position
  -      do i = 1, dim
  +      do i = 1, dim - 1
             theta = i * 2 * 3.14159 / dim
             pos(1,i) = cos(theta)
             pos(2,i) = sqrt(1 - (pos(1,i) * pos(1,i)))
  +      end do
  +
  +      !! initialize the weighting scheme for NM transformations
  +      do i = 1, dim - 1
  +          roll = 0
  +          do j = 1, dim - 1
  +              weights(i, list(i,j)) = roll
  +              roll = roll + 0.5
  +          end do
         end do
   
   end subroutine
  
positive.code: end subroutine
  
  !! Finds the initial list variable set
  subroutine pop_list(list, dim, pos)
        implicit none
        integer, dimension(:,:) :: list
        integer                 :: dim, i, j, k, swap, tmp
        integer, parameter      :: seed = 1
        real*8                  :: var, theta
        real*8, dimension(:,:)  :: pos
  
        !! Initialization!
        do i = 1, dim
            do j = 1,dim - 1
                list(i,j) = j
            end do 
  
negative.code: 
  end subroutine
  
  !! Total contraction for salesman
  pure subroutine contractall_sales(weights, max, dim)
        implicit none
        real*8, dimension(:,:), intent(inout) :: weights
        integer, intent(in)                   :: max, dim
        integer                               :: i, j
  
        do i = 1, dim - 1
            if (i.NE.max) then
                do j = 1, dim - 1
                    weights(i,j) = (weights(i,j) + weights(dim,j)) * 0.5
                end do
            end if
        end do
  
  end subroutine
  
  !! for Nelder Mead reflections
  pure subroutine reflect(pos, min, dim, alpha)
        implicit none
  