tweaked code for iframe template