Passing an array to a method