automatic distance calculation implemented
styled up