simple hashmap and vector code