more mocking
test fixes
api refinement