refactor TypeBuilder