vector subclass with distance