removed the last if statements