adding Q_template.c