got basic local storage working. really wonder if this is the way it should be done :(