add offline/online handling example