Migrating to the new object model
Adding a distance function