modify wav conversion code