redid code for model