refactor map unmap