Rewrite cidr limiting to use a hashmap