Added get_profile function.