added const to a sort