implemented hlint suggestions