commented code that causes freeze at end of run