Tpfahp's arry changed to float type and refactoring done.