edit profile logic