t function fixed