code formatting, no logic change
removed redudant variable