Added next and previous button implementation