adds localstorage...I don't really know what I'm doing in javascript