refactoring by hlint