fixed array passing to functions