added method to return 2d array of table.