optimized sustained min/max functions
optimized UA code to fix looping
optimized UA code for approach phase calcs