Implemented next() and prev()