add and document the .toArray() method