even more updated simple_tps.py