replacement for original map_swapper