Removed code other than step 1-3 (3b).