added left arrow functionality and fixed a small bug