changed powersupply to static variable