moving diag out of Matrix