Got the code P0369(exhaust camshaft position sensor)(other codes such as P0505, P0141 came with it). So I tried to replace it first and found one for $40(inculde shipping) on ebay. Replaced the sensor and the codes were gone~~ Y!!
But, one day later, the engine light came back and it's P0161. Checked posts on forum and found out the aftermarket sensors weren't compatable with BMW~~! Damn it, I should read the posts sooner~
Went to the local stealer, it cost me $214CAD just for the sensor



. Installed it, no codes since then~
My experience:
If ever find code of O2 sensor or misfire, check the area from air intake system and the last thing is to replace O2 sensor.