use in-line ifs