prints out average distance