Refactored joining api