Pastable version of too many ifs and ands