Added phasor calculation