Implemented the join command