removed erroneous if statements