before model update