add refactoring
update readme and add refactored script
remove old script
Merge pull request #3 from downeast/master

refactor script