some improvements to the mapper module