added more changes to profile sort