find and update user function