ordering: revision to ordering and clean up