#18 refactoring with hlint: finished