changes dictionary for hexadecimal syntax for compatibility woth other versions of python