local storage and save function added