renamed base class + minor refactorings