Added T test and test functions