add program flow of AcDc
fix coding style