added image showing logic and some changes to power and reset logic