modify typebuilder for semantic analysis