Shouldn't we combine this with the one above rather than two separate ifs?