template support added for tables