Added in a distance to stop method, it still needs some refining as it is not calling the method at the right time.