two pass two tables