working on AppendMatrix