refactored component