cleaned entropy script