sorting services and snis to be deterministic