added component-based code