Move gsub to model