Changed to hashmap implementation