uppercased all %% variables for clarity
changed %%E to %%X