seem the std::swap default isn't good for overmap so for now duplicate code