removed a redundent if statement.