changed to hashmap