introduced new class, changed constructors and added comments