fixed various bugs in tests. tests pass.
add comments for async method