updated schema to account for templates