more intelligent dict loading