Added the next() and prev() methods