replace edx with variable substitution

fixes template errors

keep tos untranslated