make the async API non-blocking

one test is still failing and the change was kind of massive so
more tests are necessary before merging to master