Added next button functionality