Added model 1 code