manual table and purge code