major debugging in join.cpp