additional function to return parsed template as string