changing arrow's direction when clicked