Renaming phis working. Didn't check if output is correct yet