add API for table stats