added optional subclassing.
documented new() method