change map to array and made more resilient
reboot and poweroff