added functionality to next button closes #3