inserting into db working