fixing sonar violations