surface sorting refinements, ver 5