working when run using bundler

Still need to:
* add tests for new code
* ensure it works when deployed as a gem