Introduce 'onNext' and 'onPrev' functions