added unit testing with mocha