script for producing LHE files with weights