added yields to parallel functions