adapt the code to filter out new structure of testcase templates