add yield to function call