made sinewave example work