wrap in ifs