Painfully connecting the tables