passing Array to a Function