changed model to do all updates at once