added previous and next buttons