change glossary array to hashmap (object)