Added code relating to tables