Add model logic