2d ifs working