Fix: using arrays as arguments for functions