removed needless toArray calls