mostly finished phi insertion. started rename