The code for T2