trying to make it work as an npm module