update readme
refactor code