implemented pi0 and reworked infile