added component loader function