added several methods to add different parts of the component.