Adding functionality for the next button to recreate the activity