refactor: extract dictionary into another class