previous and next button work together to cycle through input options