Added getComponent function