refact component