contract violation detection added