refactor update map