minor tweak
adding #defines
wrote the ‘best scale’ method