if (join.table in tables) {
                        var toTable = tables[join.table];
                        step.join = {
                            name: step.join,
                            table: {