db insert almost finished