refactoring with hlint