Sentence:  He seemed very pleased with himself , as though some intricate scheme was working out exactly as he had <WSD>planned</WSD> . 
Meaning of the word marked with <WSD> tags:  make or work out a plan for; devise