switch online state