matrix-math console test app refactored