moving power button handling into on click listener