minor tweaks to allow subclassing