better template formatting