changes made to improve the complexity of code according to analize the sonar