add destructor for Phi class