turned the class into a node module, and added a test