A little bit of refactoring

Removed unneeded variable "float sum". That's all.