testing array logic