Improvement on join