removing dead parts