use dict.get method for speedup in analyze