better template structure