Finished implementing adaptive table construction