removed unnecessary if statements