added the code for getTPFP still not checked yet