optimize warMap check