set next value using a specific method. small refactoring

uncle bob approves