Calculating distance difference functionality added, not tested