map, and a few tweaks