changed interface for subclassing