modify the profile function