finds middle joint