adding updated code for figs and tables