implementing either sync or async