modification

attempting to fix memory leakage, no luck so far