ordering is hard
finally, got the ordering