cut and paste from TT_Lib2.