component refactor