Implement Join function