added noise and cos_interpolate functions