modulation/demodulation and simulation scripts