Add commitAll function