TPS initilization code