added up and down arrow functionality