cleaned code with codemaid