add boilerplate code for async loops ex