changed syntax to use async mode