adding prev and next buttons