re-engineer tables