add code to calculate distances to buildings