measure rng and data operation time
fix potential dangling pointers
fix potential dangling pointers and other cleanup
fix timing