Add Matrix class instead of methods