converted additional conditional statements to shorter forms