made an addcomponent function and a new component template