separating out ifs