abstracted out the kinematic tree drawing