Joint function didn't return anything

I have added "return" statement to Joint function.