completed PriceComparator class