Add next() and previous() methods.