added toArray back