I think these two if() statements can be combined.