Added offline support