use trace to find phi