thusfar unsuccessfull attempt at transforming nested yield statments?