added comment to toArray