The endoscope can be used to retrieve various foreign objects from the upper GI tract, avoiding the need for invasive surgery in some cases. Endoscopy is also useful in obtaining biopsies from the stomach and colon to aid in the diagnosis of disorders such as gastro-intestinal cancers and inflammatory bowel disease.