change 'each' to 'map' and camel-case to snake-case