applied hlint suggestions, removed extraneous code, imporved list comprehension