changed name, pass lp->cur_state and lp to model