gen_sinusoidal2 should work, cannot check if it functions as it should, but I think it does