new unit test and a new method for distance storage