updated db insertion script