added output injection into template
mend