minimize single line if statements