lesson 4 - Fast way to compare distances