adding primitives for joint calculation