reduce complexity in array matcher as well