add getSubDictionary logic