have changed distance_test to seperate sides better