Extracted next-button to a separate fn.