Sentence:  It means to do it and to know one is doing it , but as only a secondary if certain effect of the good one primarily does and <WSD>intends</WSD> . 
Meaning of the word marked with <WSD> tags:  have in mind as a purpose