phasor + utils for testing and debugging