changed toArray