changes to TF package according to Ling Tianyi