a little more readable this way, though it freaked me out when it messed up the loading of local storage