async API rewritten in terms of simple