Adds next and previous methods