local storage api impl