added codes for TPS