working on join functionality