move duplicated code in kinematics_base class