refactor tests to use sinon
wip