implement WAKEUP CALM and GOTO SLEEP