changed model logic