changes for inserting records into db.