continue to refactor for dictionary