Speeding up testDistance and preparing 0.6