add click function for search