Completed Tpfahp.java