Mode coding

write all model