added local storage support