Added arrow functionality to the buttons