test array input and method is functioning