calibrate model functions working