getT function