change lua example so work is done inside coroutines