added offline and local storage