Fixed comparator bug
Implemented turning logic