added support for async api to lua