rewrite azimuth to be simpler