update of tpi script