clean code with class