added matrix printout