add a new function called tfile