Proper turn logic added