updated tetra_gt.cpp and pwin.cpp