added sin wave mode