use real matrix; simplify matrix usage