added checks for correct functions in infer/simulate