added contracts for the model - leads to more readable code