optimizing the removal of a fragment