use ut, fixed several bugs