add the offline support