added some structures and code to fill them, which will be used on inner join of the new method.