implemented click functionality