modified power circuit to work properly, too many changes and too late at night