more accurate exclude template