refactor TypePool