modifs in the library (no implications on the API): clearer separation between model and inference