implemetation of T1 added. W refactored.