switching to hashmap