Add matrix method
Refactor
Refactor
Refactor