fixed sorting w/ tuples