fixed next() and prev()

Had to compare my solution with other students to figure out the issue