Would be good to add some javadoc explaining how/when next is used