Adding next/prev functionality