comparators replacing most of the logic