steps back and next button action