write it as a matrix