code for rac joins, i.e. line by line joins