phasor: copied in preexisting functions