i replaced the exhaust cam shaft sensor and the same emissions code is showing on 2001 BMW 325i

the emissions code is po 365 could it be a defective part

Asked by for the 2001 BMW 325i
It can be so many things on these engines, it may be the VANOS is out of spec, that is the computer controlled valve timing, which is a pretty common on these cars and WILL set cam codes.