next button done, more readable code