fix changes in updateUser() and move addFriend()