reducing code