edited for phi