Modify function to recive a file to calculate ppis