- added toArray support