modified the profile update functionality.