update data on click