store valueold and valuenew as decimals as avg_time_generation is a float like 0.134