initial t2u code import from @goutamniwas