changed estimate.wrap to using X.tables