comparators code started