The next and previous functions added