refactored components to base component class