Updated API for async behavior