subclass constructor for preferenceObject changed to add long id and pDistance