Added support for asynchronous function call