fixed dictionary and updated script