added the script to make median dark images