OK so the new part arrived and installed car started fast and seemed to pull better but now cutting out, idle fine then almost stop then jump back to normal. I replaced the CPS and the car started fine, drove around the block and all seemed well untill the car cut out and ran fine again so I headed to the driveway and let it idle and it stopped again, waited five minutes and it started at 700rpm ran for a while and slowly dropped to about 500 to 600 rpm almost stalled and reset to 700 rpm for a while. so I held the throttle about 2000 rpm and the car seemed to do ok but again almost stalled and jumped to 2000 rpm. This is ongoing, the car seems to run well but will not rev above 3000rpm and continues to almost stall and then rev until cutting out, I removed the maf connection and the car revs dropped for a second then acted like before with reving then cutting out them reving again. Strange situation even with a lot of heat the car seemed to run but not right, I have not reset the system by removing the battery for a while so could that help or any other ideas?
1995 525i 225,000km Still stock for now