added next and previous button features