remove some unnecessary arguments from chain inference and add comments