refactor
add sinon