finish join.cpp && smj.cpp