adding comments on memory usage