indented ifs in model