updates for mocha testing