added computation of dots to remove