added click function for direction selector