replace remove with delete for hashmap