update maptool refactoring