Not passing var by reference anymore, reapplying modification of Felipe Morais