added comments to component.cpp