adding simple sleep wakeup code