Sentence:  He seemed very pleased with himself , as though some intricate scheme was <WSD>working</WSD> out exactly as he had planned . 
Meaning of the word marked with <WSD> tags:  happen in a certain way, leading to, producing, or resulting in a certain outcome, often well