Working code, about to start implementing total power variable