Bug fix

-- Fixed annoying, hard-to-find bug in level 2 algorithm function.
Was a mistake in assigning x and y coordinates