added cleanup func