First working version of the 2nd step. (several kludges).