added more Tcode logic