Initial working TH function