Update add model with condition function for supporting more conditions.