modified matrix toString, iteration for each