Added method toArray