refactor to 2-d array, add direction to constraint
minor stuff
temp