alternative if structure with two ifs and no else