add offline support