export location mapping to txt file
refactoring

- modify initialize args
- change encode process