added matrix to engine api