In an unwitting manner; inadvertently, obliviously, unintentionally, unknowingly.
With the intention or goal of (followed by a noun or the infinitive).