added the changes for offline mode