adding function for adapter and on click