use local storage to store preference