added 'doNew' argument for $extends