working npm module, can now be used with npm install -g