commit the whole work