here is model 1 code
