balancing

-flag test function added to debug
-timing mistake fixed
-saturation of voltages added for balancing
changes from balance testing day