implement OffsetComparator