commit every 10 patients