added ttruncat() function