tried to make sonar happy by adding useless curly brackets around one-
lined if statements and other stuff