a messy first attempt at an npm module