correct the Tsun function