Uses T in place of t to avoid name clash within function.