Script for template filling