updated edit for local storage