Added in distance functionality