New barely faster highestMag function