deleting old component and index