using a property of the case for the template data is a little sketchy, could change it to a dict containing the case separately