Trying another approach to matrix