Tailoring nanostructures with a scanning tunneling microscope