adding local storage and better design.