major change: numAAMSteps and doUseAllImagesAtEveryLevel are now input parameters