Why not combine both if statements with an and?