moved mpfit import inside subfunctions to smooth imports of rt,pk