refact recode model