better handling of the -T option