slightly improve matrix formatting