Add separate paper for distance function.