  Context: Complex molecules such as ethanol and dimethyl ether have been
observed in a number of hot molecular cores and hot corinos. Attempts to model
the molecular formation process using gas phase only models have so far been
unsuccessful. Aims : To demonstrate that grain surface processing is a viable
mechanism for complex molecule formation in these environments.
  Methods: A variable environment parameter computer model has been constructed
which includes both gas and surface chemistry. This is used to investigate a
variety of cloud collapse scenarios.
  Results: Comparison between model results and observation shows that by
combining grain surface processing with gas phase chemistry complex molecules
can be produced in observed abundances in a number of core and corino
scenarios. Differences in abundances are due to the initial atomic and
molecular composition of the core/corino and varying collapse timescales.
  Conclusions: Grain surface processing, combined with variation of physical
conditions, can be regarded as a viable method for the formation of complex
molecules in the environment found in the vicinity of a hot core/corino and
produce abundances comparable to those observed.
