makes checkHasViloations and howManyViolations functions