working remove for hashmap