bootstrap functionality

add an index for bootstrap sampling of the data