add offline handler