added new function solveRemoveViolation()