made this an npm package