refactor user profile update method