An algorithm to find the distance between any two railway stations allowing modifications to the existing database