small modification of db insert