add method to dump json in prefs
refactor method to update prefs
add boolean flag for up to date local json
check for cached json