dict_set.py latest corrections and imporoved code