reducing code smell