new kin_mod function

so that nls can be used instead of directly using optim