added setNext and setPrevious