Joint extraction function