memory improvements

Suggested change allocates the array used for the bootstrap sample ONCE before the main loop and overwrites its contents each time through.  Seems to save significantly on memory allocation, and a modest improvement in speed.