refactored tests to use coroutines