conditional statements

removed unnecessary comparisons