conditional update-in function, clicks manipulation