Cleaning up phi.
fixing phi.