added explode function which turns a table into a vector of smaller tables.