refine the code of UT.