fixed several sonar violations
fixed several sonar violations
fixed issue #5