added mocha test functions