working on simple matrix