Minor fix. Final variables should be written in capital letters.
Minor change. Avoid reassigning function parameters.
Minor change. Avoid reassigning function parameters.
Changed test so it will pass