Modify API for table following Diego's suggestion