refactor the module
add tests
update README
fork npm package