no ties, no negative numbers, fixed sorting bugs