add a new method:positionCompare