more readable iteration over map (thanks to @mfilka)
align hash
replace deprecated syntax