added sleep mode functions

sleep mode with watchdog timer