transform the ret matrix list with matrix