wrap all the ifs