scrap optimiztions