restricted to metric spaces