moved the local storage script to the top