Split into two ifs