added unit testing using mocha