update model and routes