Completed model

Completed model with final code