Add function for calculation of phase.