Added recursive next-making function.