set next value using a specific method. small refactoring

uncle bob approves
This method name indicates that we're modifying something, what about `generate_next_value`?