put comparator in its own package