prev next button works fine