refactor out implicit asynchronous functions