added a basic structure for the new join algrorithm.