Working version -- uses a second dictionary