error due to ij=25 and phase.append missing