Added the profile change logic