Role of ions in reactive ion etching