making progress - distance calculation does not work yet