Yo dawg. ifs in ifs and all that