When is it necessary to extract a tooth?