added next und previous button functionality