added badpix correction