added most recent expansion optimization (step 2)