add tgs functionality