added #define statements and refactored the dictionaries