refactor some code
map -> unmodifiableMap