put some inline if statements into multi line if else statements