profile update logic