add example code to main dealing with component removal