allow for either sync or local storage