added dictionary code from ADS