changes made in kingdoms test  and td matrix