use hashset instead of arraylist for the entities to put into not-yet-committed list to avoid duplicates