rearranges maps