removed unnecessary comparisons