Added test for previous and next