add sorting to get profiles to make tests determinstic