preparing for DB insert