sync and async implement