refactor code
update config