modified wavegen