Switched to pass a variable by reference so it can be modified in cssor
problem solution.