fixing one error in yield function