added local storage and settings