refactor mat_alg2