fixing bug in stop, fixing bug in has-next, adding each function (and documenting)