Updated the user profile function