hashmap: port to Vec<T>