rewrite of WCB_Matrix