dict.get() is more appropriate than setdefault()