changed function cleanScrap()