oops, was sorting in wrong order