changed order precendence of 'yield' to be just before return & throw