Added code for 2D tables.