added mocha compatibility