adding offline support