fixed yield function