Dry/wasteful assignment

The last line that executes will be returned. In some of your code you were performing assignments. This was not needed as you are simply returning the values.