Why not declare the variable splits in the local scope?