added frame pendig addition feature
small refactoring