add grcar matrix
add test for grcar matrix