extraction of component split to function