fixed documentation for toArray