refactoring: extracting value generation to separate class.