display matrix correctly