added automatic figure and table numbering