simplify async code