performance improvement. remove safeDomain and DangerDomain comparsion.