Updated, but not tested, dictionary functions