updated insertion script