add generic for hashmap