added new function: updateUser()