completed mocha replacement of tests