change contamination check to model phase