fixing join as function parameter