added missing utility

toArray was missing