set next value using a specific method. small refactoring

uncle bob approves
Perceived complexity for set_next_value is too high. [8/7]