almost there with the matrices