changed api to async

Signed-off-by: abbr <wenfred@gmail.com>