finished first runable version of tps