added local storage to sqlite