using local storage to persists data