Replaced global T with global D