reduced nested if, which was not necessary