added `$allowed_types` for template