sinusoidal velocity almost working