add prev,next button actions need some changes and better coding