now with offline mode
checking for offline mode