Break this up into two if statements.