implementing offline logic for tests purposes