added code for testing without coroutines