Completed T3 code