use a better sort