turn on command and preparations for turn off command