next is now a function not a method