a more readable/simple condition statement, as pointed out by @keithamus