new code to get profile