test now uses sinon