test contract and expand matrix