updated perc detector and removed percsToRemove