optimizing the component count