add params for resolving memory leak issue.