MOdified for history insert