Refactor to pass in code style

removed unnecessary break lines
commented the line 121, because the statement not pass
in the code style, and added an else statement to deal with
the condition with the same behavior