added toArray()