What about combining the two ifs?