added findcomponent() function