add azimuth smoothing and remove type casting