update the model
fix the plan adding function