Revert "Revert "adding offline functionality""

This reverts commit 666a39cf6cc00747d1f1e4008be3d931add481d8.