finishing the term type checking. Tiens vincent