corrected lesson number extraction