added distance to the persistance layer