working db insertion