made hashmap consume less memory