Slight revision of original Validate program