code cleanup using sonar