previous +  next button function added