enhance browse function.
working with sinon.js