Added condition to models