Renamed lastDirection to direction