switched contact and index to validation script