add support for localstorage save and data