rewrote much of get-power-level