Extraction, deposition, and displacement of atoms by STM