added an offline mode of operation